
import { ICheckCode, ISendCode } from '../interface/confirmCode'
import * as request from './request'

export async function senCode(body: ISendCode) {
  try {
    const data = await request.post(JSON.stringify(body), '/api/web/code/send')
    return data
  } catch (e) {
    return (e)
  }
}
export async function checkCode(body: ICheckCode) {
  try {
    const data = await request.post(JSON.stringify(body), '/api/web/code/check')
    return data
  } catch (e) {
    return (e)
  }
}